

//
//  BaseViewController.m
//  练习11
//
//  Created by 张琦 on 15/11/23.
//  Copyright © 2015年 张琦. All rights reserved.
//

#import "BaseViewController.h"
#import "ViewPlayer.h"
#import "PlayViewController.h"
#define SCR_WIDTH     [UIScreen mainScreen].bounds.size.width
#define SCR_HEIGHT    [UIScreen mainScreen].bounds.size.height
@interface BaseViewController ()
@property (nonatomic, retain) ViewPlayer *viewPlayer;
@end

@implementation BaseViewController
- (void)dealloc
{
    [_viewPlayer release];
    [super dealloc];
}
- (void)createView
{
    self.viewPlayer = [ViewPlayer shareViewPlayer];
    self.viewPlayer.frame = CGRectMake(0, SCR_HEIGHT - 60 - 64, SCR_WIDTH, 60);
    self.viewPlayer.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:self.viewPlayer];
    [_viewPlayer release];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.navigationController.automaticallyAdjustsScrollViewInsets = NO;
    
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"2"] forBarMetrics:UIBarMetricsDefault];
    self.navigationController.navigationBar.hidden = NO;
    self.navigationController.navigationBar.alpha = 1;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [PlayViewController sharePlayViewController];
//    [self createView];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
